knitr::opts_chunk$set(echo = TRUE, warning = FALSE, message = FALSE, fig.align = 'center')
library(caret) library(doParallel) cl <- makePSOCKcluster(5) registerDoParallel(cl) fitControl <- trainControl(method = "repeatedcv", number = 10, repeats = 10)
TrainingData <- readRDS(file = "/mnt/raid5/Personal/tangchao/project/Nanopore/BarcodeDecomplex/analysis/06.DecodingDeePlexiConAndPoreplex/00.ModelTraining/00.RData/DeePlexiCon_TrainingSet.Rds") set.seed(825) Fit1 <- train(Class ~ ., data = TrainingData, preProc = c("center", "scale", "YeoJohnson", "nzv"), method = "rf", trControl = fitControl, verbose = FALSE, # to evaluate: # tuneGrid = expand.grid(mtry = 2), tuneLength = 1, metric = "Accuracy", allowParallel = TRUE) save(Fit1, file = "/mnt/raid5/Personal/tangchao/project/Nanopore/BarcodeDecomplex/analysis/06.DecodingDeePlexiConAndPoreplex/00.ModelTraining/01.Model/DeePlexiCon_Classifier_V1.RData") stopCluster(cl)
TrainingData <- readRDS(file = "/mnt/raid5/Personal/tangchao/project/Nanopore/BarcodeDecomplex/analysis/06.DecodingDeePlexiConAndPoreplex/00.ModelTraining/00.RData/Poreplex_TrainingSet.Rds") set.seed(825) Fit1 <- train(Class ~ ., data = TrainingData, preProc = c("center", "scale", "YeoJohnson", "nzv"), method = "rf", trControl = fitControl, verbose = FALSE, # to evaluate: # tuneGrid = expand.grid(mtry = 2), tuneLength = 1, metric = "Accuracy", allowParallel = TRUE) save(Fit1, file = "/mnt/raid5/Personal/tangchao/project/Nanopore/BarcodeDecomplex/analysis/06.DecodingDeePlexiConAndPoreplex/00.ModelTraining/01.Model/Poreplex_Classifier_V1.RData") stopCluster(cl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.